<template>
    <div>
        <!-- 头部部分 -->
        <header class="header">
            <h1>todos</h1>
            <input @keyup.enter="add" v-model="ipt" class="new-todo" placeholder="请输入任务名称" autofocus />
        </header>
    </div>
</template>
<script setup>
import { ref, defineEmits } from "vue";
const ipt = ref('');
const emits = defineEmits(["add"]);
console.log(11111111111111);
function add() {
    emits('add', ipt.value);
    ipt.value = '';
}
</script>